<%--
    User: limeng
    Date: 16/6/6
    Time: 上午9:35
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="panel panel-default">
    <link rel="stylesheet" href="../../css/proposalDetail.css" />
    <div class="panel-heading">
        <h3>查看提案</h3>
    </div>

    <div class="panel-body">
        <section class="proposalDiv">
            <div class="proposal_title">
                <span class="title_font">{{proposal.title}}</span><br>
                <span class="blue_font">作者:</span>{{proposal.author.name}}&nbsp;&nbsp;
                <span class="blue_font">修改日期:</span>
                {{proposal.updateTime | date:"yyyy-MM-dd  h:mma"}}&nbsp;&nbsp;
                <span class="blue_font">点击次数：</span>{{proposal.clickCount}}
            </div>

            <div class="proposal_content" id="proposalContent">

            </div>
        </section>
    </div>

    <div class="panel-footer">
        <div class="row">
            <div ng-repeat="secondMotion in secondMotionList">
                <div class="well">
                    {{secondMotion.author.name}}说：<br>
                    {{secondMotion.content}}
                </div>
            </div>
            <button class="btn btn-primary" ng-show="showMoreMotion" ng-click="refreshMotionList()">
                显示更多…
            </button>
        </div>

        <div class="row">
            <div class="pull-right" style="margin-right: 10px">
                <button class="btn btn-danger" type="button" ng-click="proposalReject()">不予立案</button>
                <button class="btn btn-primary"
                        ng-click="openDialog()">
                    立案
                </button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="registProposalDialog">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h3>立案</h3>
    </div>
    <div class="modal-body">
        <div class="form-group">
            <label for="proposalType">分类</label>
            <select class="form-control"
                    id="proposalType"
                    ng-model="registProposal.type">
                <option value="">请选择</option>
                <option value="0">教务</option>
                <option value="1">财务</option>
                <option value="2">管理</option>
                <option value="3">其他</option>
            </select>
        </div>

        <div class="form-group">
            <label>主办部门</label>
            <select class="form-control"
                    ng-model="registProposal.hostDepartmentId"
                    ng-options="department.id as department.name for department in departments">
            </select>
        </div>

        <div class="form-group">
            <label>协办部门</label>
            <div class="well">
                <div ng-repeat="department in assistDepartments">
                    <label>
                        <input type="checkbox"
                               name="cb_assistDepartment"
                               ng-value="department.id" />
                        {{department.name}}
                    </label>
                </div>
            </div>
        </div>
    </div>

    <div class="modal-footer">
        <button type="button" data-dismiss="modal" class="btn btn-danger">取消</button>
        <button type="button" data-dismiss="modal" class="btn btn-primary" ng-click="doRegist()">立案</button>
    </div>
</div>
